package com.inetools.gwt.gajaxs.client;

import com.google.gwt.core.client.JsArray;

/**
 * Data model (JavaScriptObject) class for json object returned by Picasa API
 * http://code.google.com/apis/picasaweb/docs/2.0/reference.html#gphoto_reference
 */
public class GPhotoAlbumFeedData extends GDataFeedModel {
	protected GPhotoAlbumFeedData() {
		super();
	}
	
	// Class definitions for sub elements of entry element ----------------------------------------
	public static class Entry extends GDEntry {
		protected Entry() {
			super();
		}
		
		/**
		 * @return Album's access level. Either "public or private".
		 */
		public final native String getGPhotoAccess() /*-{
			return this.gphoto$access.$t;
		}-*/;
		
		/**
		 * @return Value type of gphoto$access.$t is actually unsigned integer. 
		 * Thereby, this may cause exception.
		 * Refer to http://code.google.com/apis/picasaweb/docs/2.0/reference.html#gphoto_commentCount
		 */
		public final native int getGPhotoCommentCount() /*-{
			return this.gphoto$commentCount.$t;
		}-*/;
		
		public final native String getGPhotoCommentingEnabled() /*-{
			return this.gphoto$commentingEnabled.$t;
		}-*/;
		
		public final native String getGPhotoId() /*-{
			return this.gphoto$id.$t;
		}-*/;
		
		public final native String getGPhotoLocation() /*-{
			return this.gphoto$location.$t;
		}-*/;
		
		public final native String getGPhotoName() /*-{
			return this.gphoto$name.$t;
		}-*/;
		
		public final native String getGPhotoNickName() /*-{
			return this.gphoto$nickname.$t;
		}-*/;

		/**
		 * @return Value type of gphoto$numphotos.$t is actually unsigned integer. 
		 * Thereby, this may cause exception.
		 * Refer to http://code.google.com/apis/picasaweb/docs/2.0/reference.html#gphoto_numphotos
		 */
		public final native int getGPhotoNumPhotos() /*-{
			return this.gphoto$numphotos.$t;
		}-*/;
		
		/**
		 * @return String representation of long value what is milliseconds since January 1st, 1970
		 * http://code.google.com/apis/picasaweb/docs/2.0/reference.html#gphoto_timestamp
		 */
		public final native String getGPhotoTimeStamp() /*-{
			return this.gphoto$timestamp.$t;
		}-*/;
		
		public final native String getGPhotoUser() /*-{
			return this.gphoto$user.$t;
		}-*/;
	} // public static class Entry extends GDEntry
	
	
	public final native JsArray<Entry> getEntries() /*-{
		return this.feed.entry;
	}-*/;
	
	public final native String getGPhotoNickName() /*-{
		return this.feed.gphoto$nickname.$t;
	}-*/;
	
	public final native String getGPhotoThumbnail() /*-{
		return this.feed.gphoto$thumbnail.$t;
	}-*/;
	
	public final native String getGPhotoUser() /*-{
		return this.feed.gphoto$user.$t;
	}-*/;
	
	/*
	 * I suspect that this is a part of common GData, not GPhoto (Picasa) data specific. 
	 */
	public final native String getIcon() /*-{
		return this.feed.icon.$t;
	}-*/;
	
	
	/*
	 * I suspect that this is a part of common GData, not GPhoto (Picasa) data specific. 
	 */
	public final native int getOpenSearchItemsPerPage() /*-{
		return this.feed.openSearch$itemsPerPage.$t;
	}-*/;
	/*
	 * I suspect that this is a part of common GData, not GPhoto (Picasa) data specific. 
	 */
	public final native int getOpenSearchStartIndex() /*-{
		return this.feed.openSearch$startIndex.$t;
	}-*/;
	/*
	 * I suspect that this is a part of common GData, not GPhoto (Picasa) data specific. 
	 */
	public final native int getOpenSearchTotalResults() /*-{
		return this.feed.openSearch$totalResults.$t;
	}-*/;
}
